<%--
  Created by cofey on 16/11/20.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>本地化资源管理</title>
</head>
<body>
<!-- 当前位置 -->
<div id="urHere">无线南山统一管理平台<b>></b><strong>本地化资源列表</strong></div>
<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <%--<h3><a href="#" class="actionBtn add">添加政企信息</a>政企信息列表</h3>--%>
    <div class="filter" style="margin-top: 20px;">
        <table>
            <tr>
                <td align="right" width="10%">区域:</td>
                <td width="38%"><input name="filter_area" type="text" class="inpMain"/></td>
                <td align="right" width="10%">类型:</td>
                <td width="38%">
                    <select name="filter_type">
                        <option value="">---全部---</option>
                        <option value="0">视频</option>
                        <option value="1">文档</option>
                        <option value="2">图片</option>
                        <option value="3">其他</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td align="right" width="10%">名称:</td>
                <td width="38%"><input name="filter_name" type="text" class="inpMain"/></td>
                <td align="right" width="10%">时间:</td>
                <td width="38%">
                    <input name="filter_begin_time" type="text" class="inpMain Wdate" onclick="WdatePicker()"
                           readonly="readonly"/> -
                    <input name="filter_end_time" type="text" class="inpMain Wdate" onclick="WdatePicker()"
                           readonly="readonly"/>
                    <input name="submit" class="btnGray" type="button" value="筛选" onclick="config.loadContent();"/>
                </td>
            </tr>
        </table>
    </div>
    <div id="list">
        <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
            <thead>
            <tr>
                <th width="5%" align="center">序号</th>
                <th width="8%" align="center">区域</th>
                <th width="10%" align="center">名称</th>
                <th width="5%" align="center">类型</th>
                <th width="20%" align="center">简要</th>
                <th width="10%" align="center">创建时间</th>
                <th width="15%" align="center">所属单位</th>
                <th width="10%" align="center">存储路径</th>
                <th width="10%" align="center">审核时间</th>
                <th width="8%" align="center">审核人</th>
            </tr>
            </thead>
            <tbody></tbody>
        </table>
        <form name="selectForm" action="${ctx}/lr/content" method="post">
            <div class="g-pagebar"></div>
            <input type="hidden" name="type"/>
            <input type="hidden" name="area"/>
            <input type="hidden" name="name"/>
            <input type="hidden" name="createBeginTime"/>
            <input type="hidden" name="createEndTime"/>
        </form>
    </div>
</div>
<script type="text/javascript">
    var config = null;
    jQuery(function ($) {
        var $container = $('.mainBox');
        var $filter = $container.find('.filter');
        var $pagebar = $container.find('.g-pagebar');
        var $tbodyContent = $container.find('table.tableBasic tbody');
        var $selectForm = $container.find("form[name=selectForm]");
        config = {
            pagebar: $pagebar,
            init: function () {
                config.loadContent();
            },
            loadContent: function () {
                config.setQueryWhere();

                $tbodyContent.empty();
                $pagebar.off();

                var optionsPost = {
                    success: function (data) {
                        $tbodyContent.html(data);
                    }
                };
                $selectForm.ajaxSubmit(optionsPost);
            },
            setQueryWhere: function () {
                var type = $filter.find("select[name=filter_type]").val();
                var area = $filter.find("input[name=filter_area]").val();
                var name = $filter.find("input[name=filter_name]").val();
                var createBeginTime = $filter.find("input[name=filter_begin_time]").val();
                var createEndTime = $filter.find("input[name=filter_end_time]").val();

                $selectForm.find("input[name=type]").val(type);
                $selectForm.find("input[name=area]").val(area);
                $selectForm.find("input[name=name]").val(name);
                $selectForm.find("input[name=createBeginTime]").val(createBeginTime);
                $selectForm.find("input[name=createEndTime]").val(createEndTime);
            }
        }

        config.init();
    });
</script>
</body>
</html>
